package com.leetcode.字符逆序;

import java.util.Scanner;

/**
 * <p>
 * 参考：https://www.nowcoder.com/practice/cc57022cb4194697ac30bcb566aeb47b?tpId=37&tqId=21329&rp=1&ru=%2Fta%2Fhuawei%2F&qru=%2Fta%2Fhuawei%2Fquestion-ranking&tab=answerKey
 * </p>
 *
 * @author: Sunny
 * @date: 2021/3/11
 * @version: v1.0.0
 */
public class Main {

    public static void main(String[] args) {
        Main main = new Main();
        main.reverse();
    }

    /**
     * 字符串反转
     */
    public void reverse() {
        Scanner scanner = new Scanner(System.in);
        String value = scanner.nextLine();
        if (value.length() > 100) {
            throw new RuntimeException("input is too long!");
        }
        StringBuffer stringBuffer = new StringBuffer(value);
        stringBuffer.reverse();
        System.out.println(stringBuffer.toString());
    }

}
